package link.cocoon.common.exception;

import link.cocoon.common.base.BaseEntity;

/**
 * @author xce
 * @version V1.0
 * @date 2019/10/17 16:27
 */
public class DbException extends RuntimeException implements BaseException{

  private int code;

  private Class<? extends BaseEntity> clazz;

  public DbException(BaseEntity entity) {
    this.clazz = entity.getClass();
  }



  @Override
  public int getCode() {
    return this.code;
  }

  @Override
  public Class<?> getClazz() {
    return this.clazz;
  }

}
